

package com.zmks.jkgj.xuexiao.controller;




import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import com.zmks.jkgj.core.controller.ABaseController;
import com.zmks.jkgj.core.resp.Resp;
import com.zmks.jkgj.xuexiao.resp.WebResp;
import com.zmks.jkgj.xuexiao.service.ICrctBusiExamService;
import com.zmks.jkgj.xuexiao.service.ICrctObjClassService;
import com.zmks.jkgj.xuexiao.vo.CrctBusiExamVO;
import com.zmks.jkgj.xuexiao.vo.CrctObjClassVO;

@Controller
public class CrctBusiExamController extends ABaseController {
	
	 @Autowired
		
		private ICrctBusiExamService crctBusiExamService;	

		 //查询
		@RequestMapping("/get_CrctBusiExam_list")
		@ResponseBody
		public Resp get_CrctBusiExam_list( Integer pageIndex,
				Integer pageSize,HttpServletRequest request) {
			WebResp 	webResp = new WebResp();
		   CrctBusiExamVO CrctBusiExamVO=new  CrctBusiExamVO();
			webResp.setData(crctBusiExamService.getList(CrctBusiExamVO));
			webResp.setTotalCount(crctBusiExamService.getCount(CrctBusiExamVO));
		
			return webResp;
		}
		 //增加
		@RequestMapping("/save_CrctBusiExam")
		@ResponseBody
		public Resp save_CrctBusiExam(String name,String address, String stu_num,
				String num,String school_oid ,HttpServletRequest request) {
			WebResp 	webResp = new WebResp();
		   CrctBusiExamVO CrctBusiExamVO=new  CrctBusiExamVO();
		   CrctBusiExamVO.setName(name);
		   CrctBusiExamVO.setAddress(address);
		   CrctBusiExamVO.setStart_date(new Date());
		   CrctBusiExamVO.setStu_num(stu_num);
		   CrctBusiExamVO.setCreate_date(new Date());
		   crctBusiExamService.save(CrctBusiExamVO);
			return webResp;
		}
		 //删除
		@RequestMapping("/remove_CrctBusiExam")
		@ResponseBody
		public Resp remove_CrctBusiExam(Long id,HttpServletRequest request) {
			WebResp 	webResp = new WebResp();
			CrctBusiExamVO CrctBusiExamVO=new  CrctBusiExamVO();
			crctBusiExamService.remove(id);
			return webResp;
		}

	
	
	

}
